{% extends 'cdserver/base_list_view.html' %}
{% load static %}

{% block title %} 产品列表 {% endblock %}

{% block page_title %}
产品列表
{% endblock %}

{% block new_button %}
新建产品
{% endblock%}

{% block create_url %}
/product/create
{% endblock %}

{% block list_name %}
产品列表
{% endblock %}


{% block list_items %}
<th>ID</th>
<th>产品名称</th>
<th>当前版本</th>
<th>创建时间</th>
<th>状态</th>
<th>操作</th>
{% endblock list_items %}

{% block queryset_list %}
{% for obj in object_list %}
    <tr>
        <th> {{ obj.id }} </th>
        <td> {{ obj.name }} </td>
        <td> {{ obj.release_version }} </td>
        <td> {{ obj.created_time|date:"Y-m-d h:m:s" }} </td>
        <td> <span class="tag is-info is-light">{{ obj.get_status_display}}</span> </td>
        <td>
            <a class="view button is-link is-small" href="/product/{{ obj.id }}"> 查 看 </a>
            <a class="edit button is-primary is-small" href="/product/{{ obj.id }}/edit"> 编 辑 </a>
            <a class="del button is-danger is-small" href="/product/{{ obj.id }}/delete"> 删 除 </a>
        </td>
    </tr>
{% endfor %}
{% endblock queryset_list %}
